﻿using System.Web;

namespace ElectronicCommerce.Framework.Web.UI.GeneratedImage.ImageStore
{
    /// <summary>
    /// 图库
    /// 可存放数据库、磁盘...
    /// </summary>
    internal interface IImageStore
    {
        /// <summary>
        /// 添加一张图片
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="data"></param>
        void Add(string filePath, byte[] data);

        /// <summary>
        /// 如果一张图片已经存在则直接输出
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="response"></param>
        /// <returns></returns>
        bool TryTransmitIfContains(string filePath, HttpResponseBase response);
    }
}
